package com.stupro.cjlu.common.vo;

import lombok.Data;

import java.io.Serializable;

//前后端交互信息
@Data
public class ResultVO implements Serializable {

    public static final int NO_LOGIN = -1;
    //成功标志
    public static final int SUCCESS = 0;
    //失败标志
    public static final int FAIL = 1;
    //角色错误标志
    public static final int ERROR_ROLE = 2;
    public static final int NO_PERMISSION = 3;
    public static final int INVALID_PARAMETER = 4;
    public static final int SERVER_ERROR = 10;
    private static final long serialVersionUID = 1L;

    //码
    private Integer code;
    //有相关信息
    private String message;
    //数据
    private Object data;
    //数据总数,默认0
    private long total = 0;

    public ResultVO() {

    }

    public ResultVO(Integer code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }
}
